import { axios } from '@/utils/request'

//查询所有角色
export function selectAllRole(parameter) {
  return axios({
    url: '/sys/sysRole/selectAll/'+parameter,
    method: 'get'
  })
}

export function selectPage(parameter) {
  return axios({
    url: '/sys/sysRole/selectList/' + parameter.pageNum + "/" + parameter.pageSize,
    method: 'post',
    data: parameter
  })
}

export function selectRoleIdByUserId(parameter) {
  return axios({
    url: '/sys/sysRole/selectRoleIdByUserId/'+parameter,
    method: 'get'
  })
}

export function save(parameter) {
  return axios({
    url: '/sys/sysRole/addOrUpdate',
    method: 'post',
    data: parameter
  })
}

export function del(parameter) {
  return axios({
    url: '/sys/sysRole/delete/' + parameter,
    method: 'get'
  })
}